{$layout "layout_popup"}

<h3>创建记录</h3>
<form class="ui form" data-tea-action="$" data-tea-success="success">
    <csrf-token></csrf-token>
    <input type="hidden" name="domainId" :value="domain.id"/>
    <table class="ui table definition selectable">
        <tr>
            <td class="title">记录名</td>
            <td>
                <div class="ui input right labeled">
                    <input type="text" name="name" ref="focus"/>
                    <span class="ui label">.{{domain.name}}</span>
                </div>
            </td>
        </tr>
        <tr>
            <td>记录类型</td>
            <td>
                <select class="ui dropdown auto-width" name="type" v-model="type" @change="changeType">
                    <option v-for="t in types" :value="t.type">{{t.type}}</option>
                </select>
                <p class="comment">{{typeDescription}}</p>
            </td>
        </tr>
        <tr>
            <td>记录值</td>
            <td>
                <input type="text" name="value" maxlength="512"/>
            </td>
        </tr>
        <tr>
            <td>TTL</td>
            <td>
                <select class="ui dropdown auto-width" name="ttl">
                    <option v-for="v in ttlValues" :value="v.value">{{v.name}}</option>
                </select>
            </td>
        </tr>
        <tr>
            <td>线路</td>
            <td>
                <ns-routes-selector></ns-routes-selector>
            </td>
        </tr>
        <tr>
            <td>备注</td>
            <td>
                <textarea rows="2" name="description"></textarea>
            </td>
        </tr>
    </table>
    <submit-btn></submit-btn>
</form>